# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=hbad
pkgver=1.0
pkgrel=3
groups=('blackarch' 'blackarch-scanner')
pkgdesc='This tool allows you to test clients on the heartbleed bug.'
arch=('x86_64' 'aarch64')
url='http://www.curesec.com/'
license=('MIT')
depends=('openssl')
source=('http://www.curesec.com/data/hbad-release.tar.gz')
sha512sums=('054ba70d756023675c0294ffbc5b521362844c85')

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/" server.crt server.key
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

